<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
	</body>
	<script type="text/javascript">
		function takeLongTime() {
			return new Promise(resolve => {
				setTimeout(() => resolve("打印文字"), 1000);
			});
		}

		async function test() {
			const v = await takeLongTime();
			console.log(v);
		}

		test();
	</script>

</html>